package tcp;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class 接收端 {
    public static void main(String[] args) throws Exception{
        System.out.println("接收端正在接收 Loading.....");
        ServerSocket serverSocket = new ServerSocket(3333);
        Socket accept = serverSocket.accept();
        BufferedReader br = new BufferedReader(new InputStreamReader(accept.getInputStream()));
        String data = br.readLine();
        System.out.println(data);
        accept.close();
        serverSocket.close();
    }
}
